import 'package:get/get.dart';
import 'package:smart_home/model/device.dart';
import 'package:smart_home/service/network/api_search_device.dart';

class AddDeviceController extends GetxController {
  RxInt dftId = 0.obs;
  RxList records = [].obs;
  changeDftId(int? dftId) {
    dftId = dftId;
    SerarchDeviceApi.getDeviceList(devFirstType:dftId).then((value) => {
          // print(records.runtimeType)
          records.value = Device.fromJson(value).result!.records!.toList()
        });
  }
}
